<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/common/taglibs.jsp"%>

<html>
<head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     <title>Biblioteca Virtual</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="css/civilized.css" rel="stylesheet" type="text/css" />
</head>
<body>
<body>
    <div id="outer">
        <%@ include file="menuSuperiorAdmin.jsp"%>
        <div id="content">
            <div id="primaryContentContainer">
                <div id="primaryContent">
                
            <h3>Usuarios</h3>
            <blockquote>
                <form:form modelAttribute="usuario" >
                 <table>
                  
                    <tr> 
                        <td>Nombre :</td>
                        <td ><form:input path="nombre" cssClass="txt"  /></td>
                        <td >Número de Documento :</td>
                        <td ><form:input path="documento"  cssClass="txt" /></td>
                    </tr>
                    <tr> 
                        <td >Apellido Paterno:</td>
                        <td ><form:input path="apePaterno"  cssClass="txt"  /></td>
                        <td >Apellido Materno :</td>
                        <td ><form:input path="apeMaterno"  cssClass="txt"  /></td>
                    </tr>
                    <tr> 
                        <td > <label >Estado :</label></td>
                        <td >
                        <form:select path="activo" >
                            <form:option  value=""  >-Todos-</form:option>
                            <form:option  value="1" >Activo</form:option>
                            <form:option  value="0" >Inactivo</form:option>
                        </form:select>
                        </td>
                        <td ></td>
                        <td ><input type="submit"  id="btnBuscar" value="Buscar" style="cursor:pointer" class="btn"   /></td>
                    </tr>
                   
                </table>
		    </blockquote>
                    <h3>
                       Resultados</h3>
                    <table width="100%">
                        <tr>
                            <th>
                                Codigo
                            </th>
                            <th>
                                Nombre
                            </th>
                             <th>Estado</th>
                            <th></th>
                        </tr>

                       <c:forEach items="${listaUsuarios}" var="obj" varStatus="status"  >

                              <c:choose>
                                  <c:when test="${status.count%2==0}">
                                      <tr class="rowA">
                                  </c:when>
                                  <c:otherwise>
                                      <tr class="rowB">
                                  </c:otherwise>
                                </c:choose>
                            <td>
                                ${obj.idusuario}
                            </td>
                            <td>
                                 ${obj.nombre}, ${obj.apePaterno} ${obj.nombre}
                            </td>
                           
                           <td align="center" valign="middle" style="width:25px">
                                <c:choose>
                                  <c:when test="${obj.activo=='1'}">
                                       <img src="images/botones/accept.png"  alt="Activo"/>
                                  </c:when>
                                  <c:otherwise>
                                      <img src="images/botones/cancel.png"  alt="Inactivo"/>
                                  </c:otherwise>
                                </c:choose>
                          </td>
                          <td align="center" valign="middle" style="width:25px">
                             <a href="mantUsuario.htm?idusuario=${obj.idusuario}">
                                 <img name="editar" src="images/botones/edit.png"  alt="Editar"/>
                             </a>
                          </td>
                        </tr>

                       </c:forEach>
                    </table>
                 </form:form>
                </div>
            </div>
            <div id="secondaryContent">
                <h3>Usuarios</h3>
                <ul>
                    <li><a href="mantUsuario.htm">Administrar Usuarios</a></li>
                                   
                </ul>
			</div>
        <div class="clear"></div>
	</div>
	 <%@ include file="/common/footer.jsp"%>
    </div>
</body>
</body>
</html>
